# name : hash: merge using set (keep all)
# key : hash_merge_set
# contributor: Shuguang Sun
# --
data ${1:match} (drop = rc);
  set ${2:small} point = _n_; * get key/data attributes for parameter type matching;
* set small (obs = 1); * this will work, too!;
* if 0 then set small; * and so will this!;
* set small (obs = 0); * but for some reason, this will not;

  if _N_ = 1 then do;
    dcl hash ${3:hh} (dataset: '$2', hashexp: 10);
    $3.DefineKey( 'key' ); ** default to keep the first obs in the key, add();
    $3.DefineData( 's_sat' );
    $3.DefineDone();
  end;

  set ${4:large} end = eof2;
  rc = $3.find(); /* if rc eq 0; */
run;